import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../components/login.vue'
import Home from '../components/home.vue'
import Index from '../components/subcomponents/index.vue'
import Information from '../components/subcomponents/information.vue'
import Account from '../components/subcomponents/account.vue'
import Statictical from '../components/subcomponents/statictical.vue'
import Manage from '../components/subcomponents/manage.vue'

Vue.use(VueRouter)

const routes = [{
  path: "/",
  redirect: "/login"
}, {
  path: "/login",
  component: Login
}, {
  path: '/home',
  component: Home,
  redirect: '/index',
  children: [{
    path: "/index",
    component: Index
  }, {
    path: '/information',
    component: Information
  }, {
    path: '/account',
    component: Account
  }, {
    path: '/statictical',
    component: Statictical
  }, {
    path: '/manage',
    component: Manage
  }]
}]

const router = new VueRouter({
  routes
})

export default router